package avicit.bdp.dms.das.service;

import avicit.bdp.common.base.BaseService;
import avicit.bdp.dms.das.dao.ColumnReservedDao;
import avicit.bdp.dms.das.dto.ColumnReservedDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @金航数码科技有限责任公司
 * @作者：developer
 * @邮箱：developer@avic-digital.com
 * @修改记录：
 */
@Service
public class ColumnReservedService extends BaseService<ColumnReservedDao, ColumnReservedDTO> {

    private static final Logger LOGGER = LoggerFactory.getLogger(ColumnReservedService.class);


    public boolean checkColumnReserved(String type, String keyword) {
        ColumnReservedDTO query = new ColumnReservedDTO();
        query.setName(keyword);
        query.setType(type);
        List<ColumnReservedDTO> list = this.selectList(query);
        if(list.isEmpty()){
            return true;
        }else{
            return false;
        }
    }
}